import VueRouter from 'vue-router'

/*导入对应的路由组件*/
import home from './components/tabbar/home.vue';
import search from './components/tabbar/search.vue';
import shorpcar from './components/tabbar/shorpcar.vue';
import member from './components/tabbar/member.vue';
import newslist from './components/news/newslist.vue';
import newsInfo from './components/news/newsinfo.vue';
import photolist from './components/photos/photolist.vue';
import photoinfo from './components/photos/photoinfo.vue';
import goodslist from './components/goods/goodslist.vue';
import goodsinfo from './components/goods/goodsinfo.vue';
import goodsdesc from './components/goods/goodsdesc.vue';
import goodscomment from './components/goods/goodscomment.vue';

var router = new VueRouter({
  routes: [
    {name:"",path:'/',redirect:'/home'},
    {name:"home",path:'/home',component:home},
    {name:"search",path:'/search',component:search},
    {name:"shorpcar ",path:'/shorpcar',component:shorpcar},
    {name:"member",path:'/member',component:member},
    {name:"newslist ",path:'/home/newslist',component:newslist},
    {name:"newsInfo ",path:'/home/newsinfo/:id',component:newsInfo},
    {name:"photolist",path:'/home/photolist',component:photolist},
    {name:"photoinfo",path:'/home/photoinfo/:id',component:photoinfo},
    {name:"goodslist",path:'/home/goodslist',component:goodslist},
    {name:"goodsinfo",path:'/home/goodsinfo/:id',component:goodsinfo},
    {name:"goodsdesc",path:'/home/goodsdesc/:id',component:goodsdesc},
    {name:"goodscomment",path:'/home/goodscomment/:id',component:goodscomment}
  ], linkActiveClass:'mui-active'
});

export default router;